import Vue from 'vue';

import Cookies from 'js-cookie';

import 'normalize.css/normalize.css';

import GeminiScrollbar from 'vue-gemini-scrollbar';

// 引入css
import 'vue-happy-scroll/docs/happy-scroll.css';

import Element from 'element-ui';
//
import mavonEditor from 'mavon-editor';
import 'mavon-editor/dist/css/index.css';
import 'element-ui/lib/theme-chalk/display.css';

// 数据字典
import dict from './components/Dict';

// 权限指令
import permission from './components/Permission';
import './assets/styles/element-variables.scss';
// global css
import './assets/styles/index.scss';
// 代码高亮
import VueHighlightJS from 'vue-highlightjs';
import 'highlight.js/styles/atom-one-dark.css';

import App from './App';
import store from './store';
import router from './router/routers';
import { HappyScroll } from 'vue-happy-scroll';
// cron 组件
import VueCorn from 'vue-cron';
Vue.component('happy-scroll', HappyScroll);
import moment from 'moment';
Vue.prototype.$moment = moment;
import './assets/icons'; // icon
import './assets/icons/icon-list/iconfont.css';
import './router/index'; // permission control
import 'echarts-gl';
Vue.use(GeminiScrollbar);
Vue.use(VueHighlightJS);
Vue.use(mavonEditor);
Vue.use(permission);
Vue.use(dict);
Vue.use(VueCorn);
Vue.use(Element, {
  size: Cookies.get('size') || 'small' // set element-ui default size
});
// 自定义组件名
Vue.config.productionTip = false;

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
});
